<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../skin/pub/css/font-awesome.min.css">
    <link rel="stylesheet" href="../skin/pub/css/bootstrap.css">
    <link rel="stylesheet" href="../skin/css/examinations.css">
    <title>精准测评</title>
</head>

<body>
<input type="text" name="mss" id="mss"/>

<form action="./index.html">
    <input type="text" value="name" name="name"/>

</form>

</body>

</html>

<script src="../skin/pub/js/jquery-1.11.3.min.js"></script>
<script src="../skin/pub/layer/layer.js"></script>
<script type="text/javascript">
    <!--
    window.onload=function(){

        daojishi();
    }

    var counttime=0.1*60;//总秒钟

    function daojishi(){
        if(counttime>=0){
            var ms = counttime%60;//余数 89%60==29秒
            var mis = Math.floor(counttime/60);//分钟
            if(mis>=60){
                var hour=Math.floor(mis/60);

                mis=Math.floor((counttime-hour*60*60)/60);

                document.getElementById("mss").value=hour+"小时"+mis+"分"+ms+"秒";
            }else if(mis>=1){
                document.getElementById("mss").value=mis+"分"+ms+"秒";
            }else{
                document.getElementById("mss").value=ms+"秒";
            }


            counttime--;
            vartt =  window.setTimeout("daojishi()",1000);
        }else{
            window.clearTimeout(vartt);
            layer.confirm('考试时间结束,请单击提交', {
                btn: ['提交'] //按钮
            }, function(){
//                layer.msg('也可以这样', {
//                    time: 20000, //20s后自动关闭
//                    btn: ['明白了', '知道了']
//                });
                tijiao();
            });
//            window.confirm("考试时间结束,请单击提交");


        }


    }

    function tijiao(){
        document.forms[0].submit();
    }
    //-->
</script>